package com.acwing.partition13;

import java.io.*;

/**
 * @author `RKC`
 * @date 2022/3/5 9:01
 */
public class AC1295X的因子链 {

    private static final int N = (1 << 20) + 10;
    private static int[] primes = new int[N], minp = new int[N];
    private static boolean[] st = new boolean[N];

    private static int[] sum = new int[N];
    private static int cnt = 0;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        getPrimes(N - 1);
        while (true) {
            String s = reader.readLine();
            if (s == null || s.isEmpty()) break;
            int x = Integer.parseInt(s), k = 0, tot = 0;
            //处理x的每个因子，并求出对应的最小质因子出现的次数
            while (x > 1) {
                int p = minp[x];
                sum[k] = 0;
                //计算当前最小质因子出现的次数
                while (x % p == 0) {
                    x /= p;
                    sum[k]++;
                    tot++;
                }
                k++;
            }
            //所有质因子出现总次数的全排列
            long ans = 1;
            for (int i = 2; i <= tot; i++) ans *= i;
            //去除各个质因子重复出现的次数
            for (int i = 0; i < k; i++) {
                for (int j = 1; j <= sum[i]; j++) {
                    ans /= j;
                }
            }
            writer.write(String.format("%d %d\n", tot, ans));
        }
        writer.flush();
    }

    private static void getPrimes(int n) {
        for (int i = 2; i <= n; i++) {
            if (!st[i]) {
                primes[cnt++] = i;
                minp[i] = i;
            }
            for (int j = 0; primes[j] * i <= n; j++) {
                int t = primes[j] * i;
                st[t] = true;
                minp[t] = primes[j];
                if (i % primes[j] == 0) break;
            }
        }
    }
}
